package cn.webestar.scms.user.api.dto.Corp;

import cn.webestar.scms.commons.api.CreateBody;
import cn.webestar.scms.user.entity.Corp;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;

@Data
@Schema(description = "CorpCreateDTO")
public class CorpCreateDTO extends CreateBody {

    @Schema(description = "名称")
    private String name;

    @Schema(description = "状态，1：正常")
    private Integer status;

    @Schema(description = "创建人")
    private Long creator;

    @Schema(description = "更新人")
    private Long updater;

    @Schema(description = "删除人")
    private Long deleter;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "删除时间")
    private Date deleteTime;

    @Schema(description = "是否已删除")
    private Boolean isDeleted;

    @Override
    public Corp toDO() {
        Corp o = new Corp();
        o.setName(name);
        o.setStatus(status);
        o.setCreator(creator);
        o.setUpdater(updater);
        o.setDeleter(deleter);
        o.setCreateTime(createTime);
        o.setUpdateTime(updateTime);
        o.setDeleteTime(deleteTime);
        o.setIsDeleted(isDeleted);
        return o;
    }

}
